package org.gp953.pay.controller;

import org.gp953.basic.util.AjaxResult;
import org.gp953.pay.domain.PayBill;
import org.gp953.pay.service.IPayBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/paybill")
public class PayBillController {
    @Autowired
    private IPayBillService payBillService;

    @GetMapping("/paysn/{paysn}")
    private PayBill getPayBillInfo(@PathVariable("paysn") String paysn){
        try {
            PayBill payBill = payBillService.queryByUnionPaySn(paysn);
            return payBill;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }


}
